<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head th:replace="include/head::head"></head>

<body class="nav-md">
<div class="container body">
    <div class="main_container">

        <div th:replace="/include/sidebar"></div>
        <!-- top navigation -->
        <div th:replace="include/navigation::navigation"></div>
        <!-- /top navigation -->

        <!-- page content -->
        <div class="right_col" role="main">
            <div class="">
                <div class="clearfix"></div>
                <div class="row">
                    <div class="col-md-12 col-sm-12 ">
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>试题更改
                                    <small></small>
                                </h2>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content">
                                <br/>
                                <form id="single-upload" data-parsley-validate class="form-horizontal form-label-left"
                                      action="" method="post" onsubmit="return false">

                                    <div class="item form-group">
                                        <label class="col-form-label col-md-3 col-sm-3 label-align" for="section">所属章节
                                            <span class="required"></span>
                                        </label>
                                        <div class="col-md-6 col-sm-6 ">
                                            <input id="section" type="text" class="form-control"  th:value="${question.quesSectionName}" readonly="readonly">
                                        </div>
                                    </div>
                                    <div class="item form-group">
                                        <label class="col-form-label col-md-3 col-sm-3 label-align" for="type">试题类型
                                            <span class="required"></span>
                                        </label>
                                        <div class="col-md-6 col-sm-6 ">
                                            <input id="type" type="text" class="form-control"  th:value="${question.quesTypeName}" readonly="readonly">
                                        </div>
                                    </div>
                                    <div class="item form-group">
                                        <label for="level"
                                               class="col-form-label col-md-3 col-sm-3 label-align">试题难度</label>
                                        <div class="col-md-6 col-sm-6 ">
                                            <input id="level" type="text" class="form-control" th:value="${question.quesLevelName}" readonly="readonly">
                                        </div>
                                    </div>
                                    <div class="item form-group">
                                        <label for="content"
                                               class="col-form-label col-md-3 col-sm-3 label-align">试题内容</label>
                                        <div class="col-md-7 col-sm-6 ">
                                            <textarea id="content" class="form-control" rows="3" th:text="${question.question.quesContent}" readonly="readonly"></textarea>
                                            <br>

                                        </div>
                                    </div>
                                    <div class="item form-group">
                                        <label for="answer"
                                               class="col-form-label col-md-3 col-sm-3 label-align">试题答案</label>
                                        <div class="col-md-7 col-sm-6 ">
                                            <textarea id="answer" class="form-control" rows="3" th:text="${question.question.quesAnswer}" readonly="readonly"></textarea>
                                            <br>

                                        </div>
                                    </div>
                                    <div class="item for
                                    m-group">
                                        <label for="describe"
                                               class="col-form-label col-md-3 col-sm-3 label-align">试题解析</label>
                                        <div class="col-md-7 col-sm-6 ">
                                            <textarea id="describe" class="form-control" rows="3" th:text="${question.question.quesDescribe}" readonly="readonly"></textarea>
                                            <br>

                                        </div>
                                    </div>
                                    <div class="actionBar">
                                        <a id="back" class="buttonFinish btn btn-default">返回题库</a>
                                        <a id="previous" class="buttonPrevious btn btn-success" style="color: #fff">上一道题</a>
                                        <a id="next" class="buttonNext btn btn-primary" style="color: #fff">下一道题</a>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="clearfix"></div>
            </div>
            </div>
            <!-- /page content -->


            <!-- footer content -->
            <div th:replace="include/footer::footer">
                <!-- /footer content -->
            </div>
        </div>
    </div>
    <div id="custom_notifications" class="custom-notifications dsp_none">
        <ul class="list-unstyled notifications clearfix" data-tabbed_notifications="notif-group">
        </ul>
        <div class="clearfix"></div>
        <div id="notif-group" class="tabbed_notifications"></div>
    </div>

    <div th:replace="include/javascript::javascript"></div>
    <!--pagescript-->
    <script th:inline="javascript">
        $(function () {
            $("#next").on("click",function () {
                var section=[[${question.selectedSection}]];
                var type=[[${question.selectedType}]];
                var level=[[${question.selectedLevel}]];
                var id=[[${question.question.quesId}]];
                var page="next";
                window.location.href="/question/page-detail?Id="+id+"&&section="+section+"&&type="+type+"&&level="+level+"&&page="+page;
            });
            $("#previous").on("click",function () {
                var section=[[${question.selectedSection}]];
                var type=[[${question.selectedType}]];
                var level=[[${question.selectedLevel}]];
                var id=[[${question.question.quesId}]];
                var page="previous";
                window.location.href="/question/page-detail?Id="+id+"&&section="+section+"&&type="+type+"&&level="+level+"&&page="+page;
            });
            $("#back").on("click",function () {
                var section=[[${question.selectedSection}]];
                var type=[[${question.selectedType}]];
                var level=[[${question.selectedLevel}]];
                window.location.href="/question/manage?section="+section+"&&type="+type+"&&level="+level;
            });
        });

    </script>
</body>
</html>